<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	response.setHeader("Pragma","No-cache"); 
	response.setHeader("Cache-Control","no-cache"); 
	response.setDateHeader("Expires", 0);
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>login</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<LINK href="css/Default.css" type=text/css rel=stylesheet>
<LINK href="css/xtree.css" type=text/css rel=stylesheet>
<LINK href="css/User_Login.css" type=text/css rel=stylesheet>
<link rel="stylesheet" type="text/css" href="css/public.css">
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.6000.16674" name=GENERATOR>
</HEAD>

  <script>
function submitForm(url) 
{ 

var theform=document.loginForm; 
theform.action=url; 
theform.method="post";

theform.submit();
} 

function resetForm(){
	var theform=document.loginForm; 
	theform.reset();
	document.getElementById('error_text').style.display="none";
}
</script>

<script type="text/javascript">
document.onkeydown=function() {
   if(event.keyCode==13 ) {
	   var url = "user/login.do";
	   var theform=document.loginForm; 
	   theform.action=url; 
	   theform.method="post";
	   theform.submit();
   }
}
</script>

<BODY >
	<center>
	<FORM name="loginForm">
		<DIV id=user_login>
			<div id=error_text>
				<c:if test='${error eq 1 || error eq 2}'> 
    				<span >用户名与密码不匹配</span>
				</c:if>
			</div>
			<div id=user_name>
				<input  type="text" name="username" />
			</div>
			<div id=password>
				<input  type="password" name="password" />
			</div>
			<div id=login_button>
				<a href="javascript:void"  onClick="submitForm('user/login.do')"><div id=login_button_space> </div></a>
			</div>
			<div id=reset_button>
				<a href="javascript:void"  onClick="resetForm()"><div id=login_button_space> </div></a>
			</div>
			
		</DIV>
	</FORM>
	</center>
</body>
</html>
